package cn.chen.sparkproject.dao.impl;

import cn.chen.sparkproject.dao.ITop10SessionDao;
import cn.chen.sparkproject.domain.Top10Session;
import cn.chen.sparkproject.jdbc.JdbcHelper;

public class Top10SessionDaoImpl implements ITop10SessionDao{

    @Override
    public void insert(Top10Session top10Session) {
        String sql = "insert top10_session values (?,?,?,?)";
        Object[] params = new Object[]{
                top10Session.getTaskid(),
                top10Session.getCategoryid(),
                top10Session.getSessionid(),
                top10Session.getClickCount()
        };

        JdbcHelper jdbcHelper = JdbcHelper.getInstance();
        jdbcHelper.executeUpdate(sql, params);
    }

}
